<%@ page import = "java.util.*,
                   ro.xblue.translator.LanguageBean,
                   ro.gateway.aida.servlet.*,
                   ro.gateway.aida.obj.*,
                   ro.gateway.aida.srv.*,
                   ro.gateway.aida.*,
                   java.sql.SQLException,
                   ro.xblue.translator.TranslatorConstants,
                   ro.xblue.translator.TranslatorUtils,
                   ro.gateway.aida.utils.HttpUtils,
                   ro.gateway.aida.utils.Utils
			    ,
			    ro.gateway.aida.obj.db.ActivityDB,
			    ro.gateway.aida.db.PersistenceManager" %>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/translator.tld" prefix="trans" %>
<%@ taglib uri="/WEB-INF/taglib.tld" prefix="gtw" %>
<%@ taglib uri="/WEB-INF/usr.tld" prefix="usr" %>



<%
Utils.setBreadCrumbs(request,"bc.prjview");
String ctx = request.getContextPath();
LanguageBean lang_bean = TranslatorUtils.getCurrentLanguage(request, application);
String lang=lang_bean.language;
String idproj=HttpUtils.getValidTrimedString(request,"id",null);

String viewlink=ctx+"/activity/_project_viewer.jsp";
String viewapprovalwidget=ctx+"/events/approvals/approvalwidget.jsp";
String print=request.getParameter("print");

if (!ActivityDB.getManager(PersistenceManager
	  .tokenLookup(application)).activityExists(HttpUtils.getLong(request, "id", -1))) {
	String url = request.getContextPath() + "/frw.do?fw=notfound";
	System.out.println("Activity not found (from view.jsp). Redirecting to:" + request.getContextPath() + "/frw.do?fw=notfound");
	response.sendRedirect(url);
	return;
}
%>




<html>
<head>
	<link rel="shortcut icon" href=<html:rewrite page="/images/lpd.png"/> type="image/ico" />	
	<title>Project View</title>
<link rel="stylesheet" href="<html:rewrite page='/alf.css'/>" type="text/css">
</head>

<body>

<%if(!"yes".equals(print)) {%>
<jsp:include page="../header.jsp" />
<%} else {%>
<jsp:include page="../printhead.jsp" />
<%}%>


<jsp:include page="_project_viewer.jsp">
	<jsp:param name="id" value="<%=idproj%>" />
</jsp:include>

<%if(!"yes".equals(print)) {%>
<jsp:include page="../footer.jsp" />             
<%}%>

</body>
</html>